﻿using System.Reflection.Emit;
using System.Reflection;
using Newtonsoft.Json;

namespace SimpleMapTemplate
{
	internal class Program
	{
		static void Main(string[] args)
		{

			Console.WriteLine("st1".ToUpper()=="St1".ToUpper());
			//Type type=typeof(UserEntity);
			//Console.WriteLine("Hello, World!");

			for (int i = 0; i < 2; i++)
			{
				UserEntity user = new UserEntity();
				Type t1 = typeof(UserEntity);
				var type = DtoWrapper.CreateAnonymousType(user);
				Console.WriteLine(JsonConvert.SerializeObject(user));

				var b = Activator.CreateInstance(type);
				var p = type.GetProperties();
				foreach (var item in p)
				{
					Console.WriteLine(item.Name);
				}
				var m = type.GetMethods();
				var f = type.GetFields();
				dynamic d = (dynamic)b;
				d.MyProperty = 10;
				Console.WriteLine(JsonConvert.SerializeObject(b));
			}
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="anonymous"></param>
		/// <returns></returns>
		

	}
}
